Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(docker): use a single Dockerfile with multistage #15

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gustavovalverde
Copy link

@gustavovalverde gustavovalverde commented Sep 13, 2024

Motivation

Previously, two Dockerfiles had to be maintained for dev and prod. And some assumptions were made on the user environment and security practices.

Solution

  • Use a single Dockerfile with multistage
  • Add missing files to .dockerignore
  • Change cargo-chef implementation with the standard cache mounts from Docker to improve caching
  • Define a USER to disallow running the production container with the root user
  • Add required build arguments and environment variables
  • Allow to change the logs behavior at build time
  • Use debian instead of ubuntu

@stakelens
Copy link

stakelens bot commented Sep 13, 2024

The preview deployment is ready. 🟢

Open Build Logs

Last updated at: 2024-09-15 10:17:57 CET

@gustavovalverde gustavovalverde changed the title [do-not-merge] ref(docker): use a single Dockerfile with multistage ref(docker): use a single Dockerfile with multistage Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant